package org.apache.ibatis.configuration;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.sql.DataSource;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Classname Configuration
 * @Description Configuration是MyBatis框架的SQL配置封装类
 * @Date 2025/1/16 1:05
 * @Author zhuzhenguo
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Configuration {

    /**
     * 数据源
     */
    private DataSource dataSource;

    /**
     * 封装的mapper.xml中的sql语句，因为mapper.xml文件中不止一条sql
     * key为namespace+id
     */
    Map<String, MappedStatement> mappedStatementMap = new ConcurrentHashMap<>();

}
